package com.ssy.lingxi.enhance.entity;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 生产通知单结算明细 - DO
 * @author fhj
 * @date 2021/03/18
 * @version 2.0.0
 */
@Data
@Entity
@Table(schema = "public", name = "enhance_pno_settle_detail", indexes = {
        @Index(name = "enhance_pno_settle_detail_produce_notice_order_id_idx", columnList = "produceNoticeOrderId")
})
public class PNOSettleDetailDO implements Serializable {
    private static final long serialVersionUID = 4027124804256204180L;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "pno_settle_detail_seq")
    @SequenceGenerator(sequenceName = "enhance_pno_settle_detail_seq", name = "pno_settle_detail_seq", allocationSize = 1)
    @ApiModelProperty(value = "ID")
    private Long id;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "生产通知单ID")
    private Long produceNoticeOrderId;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "生产通知单收发货明细ID")
    private Long pnoReceiveDeliverDetailId;

    @Column(columnDefinition = "varchar(20)")
    @ApiModelProperty(value = "通知单号")
    private String noticeNo;

    @Column(columnDefinition = "varchar(60)")
    @ApiModelProperty(value = "通知单摘要")
    private String summary;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "单据时间")
    private Long produceNoticeOrderTime;

    @Column(columnDefinition = "int")
    @ApiModelProperty(value = "是否含税")
    private Integer isHasTax;

    @Column(columnDefinition = "decimal")
    @ApiModelProperty(value = "税率")
    private Double taxRate;

    @Column(columnDefinition = "numeric")
    @ApiModelProperty(value = "单据总额")
    private Double processTotalPrice;

    @Column(columnDefinition = "int4")
    @ApiModelProperty(value = "批次")
    private Integer batch;

    @Column(columnDefinition = "int8")
    @ApiModelProperty(value = "收货时间")
    private Long receiveTime;

    @Column(columnDefinition = "numeric")
    @ApiModelProperty("收货数量")
    private Double receiveNum = 0.0;

    @Column(columnDefinition = "numeric")
    @ApiModelProperty("结算金额")
    private Double receivePrice = 0.0;
}
